import { Component, Input } from '@angular/core';

@Component({
	selector: 'actlist',
	templateUrl: 'actlist.html'
})
export class ActlistComponent {

	@Input('data') data: any;
	@Input('events') events: any;

	constructor() {

	}

	onEvent = (event: string, item: any): void => {
		if (this.events[event]) {
			this.events[event](item);
		}
	}
}
